package flc.ast.adapter;

import android.view.View;
import android.widget.ImageView;

import androidx.annotation.NonNull;

import com.blankj.utilcode.util.ImageUtils;
import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.provider.BaseItemProvider;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.github.barteksc.pdfviewer.PDFView;

import java.io.File;

import flc.ast.R;
import flc.ast.bean.MyConvRecordBean;
import flc.ast.bean.MyTypeBean;
import stark.common.basic.adaptermutil.StkProviderMultiAdapter;
import stark.common.basic.adaptermutil.StkSingleSpanProvider;

public class TypeAdapter extends StkProviderMultiAdapter<MyTypeBean> {

    public TypeAdapter() {
        addItemProvider(new StkSingleSpanProvider<>(75));
        addItemProvider(new TypeProvider());
    }

    private class TypeProvider extends BaseItemProvider<MyTypeBean> {
        @Override
        public int getItemViewType() {
            return StkProviderMultiAdapter.TYPE_VIEW;
        }

        @Override
        public int getLayoutId() {
            return R.layout.item_ppt_type;
        }

        @Override
        public void convert(@NonNull BaseViewHolder baseViewHolder, MyTypeBean bean) {
            baseViewHolder.setText(R.id.tvPptTypeItemName, bean.getName());
            baseViewHolder.setImageResource(R.id.ivPptTypeItemImg, bean.getImg());
        }
    }
}
